package com.mac.mapper;

import com.mac.pojo.EducationalResources;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

import java.util.ArrayList;
@SuppressWarnings({"all"})
public interface EducationalResourcesMapper {
    /**
     * 返回所有的教育成果
     * @return 返回教育成果集合
     */
    @Select("select * from educationalresources")
    @ResultMap("educationalResourcesMap")
    ArrayList<EducationalResources> selectAllEducationalresources();

    /**
     * 根据教育成果id返回对应的教育成果
     * @param resourceId 教育成果id
     * @return 返回 EducationalResources 对象
     */
    @Select("select * from educationalresources where resource_id = #{resourceId}")
    @ResultMap("educationalResourcesMap")
    EducationalResources selectOneByeducationalresourcesId(@Param("resourceId") int resourceId);

}
